// 顶部栏
$headHeight: 64px; // 高度

// 侧边栏
$sideBarWidth: 210px; // 宽度
// $sideBarColor: #b7b5b5; // 文字颜色
$sideBarColor: #303133; // 文字颜色
$sideBarBgColor: #1b2a47; // 背景颜色
$sideBarBgColorActive: #2a395b; // 背景颜色（激活状态）

@import "./mixin.scss";
@import "./transition.scss";
@import "./element-ui.scss";
@import "./sidebar.scss";

body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
    Microsoft YaHei, Arial, sans-serif;
}

// label {
//   font-weight: 700;
// }

html {
  overflow-x: hidden;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
  // background-color: #f0f2f5;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

// main-container global css
.app-container {
  padding: 20px;
}

.pt0 {
  padding-top: 0;
}

.login,
.register {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background: url("../assets/bg.png") no-repeat center;
  background-size: cover;
}

/* 头部用户信息样式重置 */
.hidden {
  display: none !important;
}

.resetTop {
  top: 48px !important;
}

// 灰色模式
.html-grey {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
  -moz-filter: grayscale(100%);
  -ms-filter: grayscale(100%);
  -o-filter: grayscale(100%);
  filter: url("data:image/svg+xml;utf8,#grayscale");
  filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
  -webkit-filter: grayscale(1);
}

// 色弱模式
.html-weakness {
  filter: invert(80%);
  -webkit-filter: invert(80%);
  -moz-filter: invert(80%);
  -ms-filter: invert(80%);
  -o-filter: invert(80%);
}

.pc-spacing {
  margin: 10px;
}

.mobile-spacing {
  margin: 0;
}

// 表单类页面样式
.form-wrapper {
  padding: 1px 20px 40px;
}

// font-end  项目新增
// @import './variables.scss'; // Already imported in style-resources-loader
// @import './mixins.scss'; // Already imported in style-resources-loader
// @import './transition.scss';
// @import './svgicon.scss';

/* Global scss */

// body {
//   height: 100%;
//   -moz-osx-font-smoothing: grayscale;
//   -webkit-font-smoothing: antialiased;
//   font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
// }

// html {
//   height: 100%;
// }

// #app {
//   height: 100%;
// }

*,
*:before,
*:after {
  box-sizing: border-box;
}

a,
a:focus,
a:hover {
  color: inherit;
  outline: none;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.clearfix {
  @include clearfix;
}

// label {
//   font-weight: 600;
// }

.app-container {
  padding: 20px;
}

.components-container {
  margin: 30px 50px;
  position: relative;
}

// Refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

aside {
  background: #eef1f6;
  color: #2c3e50;
  padding: 8px 24px;
  margin-bottom: 20px;
  border-radius: 2px;
  display: block;
  line-height: 32px;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  a {
    color: #337ab7;
    cursor: pointer;

    &:hover {
      color: rgb(32, 160, 255);
    }
  }
}

.fixed-width {
  .el-button--mini {
    padding: 7px 10px;
    min-width: 60px;
  }
}

.filter-container {
  padding-bottom: 10px;

  .filter-item {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 10px;
  }
}

.link-type,
.link-type:focus {
  color: #337ab7;
  cursor: pointer;

  &:hover {
    color: rgb(32, 160, 255);
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;
  }
}

.text-center {
  text-align: center;
}

.sub-navbar {
  height: 50px;
  line-height: 50px;
  position: relative;
  width: 100%;
  text-align: right;
  padding-right: 20px;
  transition: 600ms ease position;
  background: linear-gradient(
    90deg,
    rgba(32, 182, 249, 1) 0%,
    rgba(32, 182, 249, 1) 0%,
    rgba(33, 120, 241, 1) 100%,
    rgba(33, 120, 241, 1) 100%
  );

  .subtitle {
    font-size: 20px;
    color: #fff;
  }

  &.draft {
    background: #d0d0d0;
  }

  &.deleted {
    background: #d0d0d0;
  }
}

.no-padding {
  padding: 0px !important;
}

// POC公用样式
.project-list-container {
  // padding: 20px;
}
.project-list-container.flex {
  display: flex;
  height: 100%;
  // min-height: calc(100vh - 84px);
  // padding: 20px;
}
.project-list-container.flexColum {
  flex-direction: column;
}
.project-list-container.paddingTop0 {
  padding-top: 0;
}
.tab-box {
  flex: 1;
  width: 100%;
}
.flex-box {
  display: flex;
}
.flex300 {
  width: 380px;
}
.width-custom100 {
  width: 100px !important;
}
.width-custom120 {
  width: 120px !important;
}
.width-custom140 {
  width: 140px !important;
}
.width-custom220 {
  width: 220px !important;
}
.width-custom230 {
  width: 230px !important;
}
.width-custom200 {
  width: 200px !important;
}

.width-custom240 {
  width: 280px !important;
}
.width-customp100 {
  width: 100% !important;
}
.list-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}
.list-h.align-center {
  align-items: center;
}
.text-right {
  text-align: right;
}

.op-btn {
  padding: 4px 6px;
}
.op-btn.error {
  color: red;
}
// 编辑/添加
h4,
.go-back {
  display: flex;
  align-items: center;
}
.go-back {
  cursor: pointer;
}
.go-back i {
  font-size: 22px;
}
.go-back:hover {
  color: #409eff;
}
.upload-demo {
  display: inline-block;
  margin-left: 30px;
}
.titles {
  display: flex;
  align-items: center;
  font-weight: bold;
  margin-bottom: 20px;
}
.gantt-box {
  flex: 1 1 400px;
}

.img-box {
  display: inline-block;
  max-width: 200px;
  margin-right: 5px;
}
.img-box img {
  max-width: 100%;
}

.redColor {
  width: 10px;
  height: 10px;
  background: #f5a623;
  border-radius: 50%;
  display: inline-block;
}
.greenColor {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #21d371;
  display: inline-block;
}
.grayColor {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #979797;
  display: inline-block;
}

.overdue-indicator {
  width: 14px;
  margin-top: 10px;
  height: 14px;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  border-radius: 17px;
  color: white;
  background: red !important;
  line-height: 14px;
  text-align: center;
  font-size: 14px;
}
.ml10 {
  margin-left: 10px;
}
.text--info:empty::before {
  content: "-";
  color: gray;
}
.text--info.subtext {
  color: #8895b7;
  word-break: break-all;
  .el-link--inner {
    color: #8895b7;
    font-weight: normal;
    &:hover {
      color: #5298ff;
    }
  }
}

.fs12 {
  font-size: 12px;
}

// 全局组件样式覆盖
.main-container {
  // 按钮
  .el-button {
    background-color: #fdfdff;
    border-color: #5298ff;
    color: #5298ff;
    font-size: 14px;
    &.el-button--primary {
      background-color: #5298ff;
      color: #fff;
      &:hover {
        background-color: #3e8cff;
      }
    }
    &.el-button--small {
      padding: 8px 17px;
      font-size: 14px;
      line-height: 14px;
      border-radius: 4px;
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
      -ms-border-radius: 4px;
      -o-border-radius: 4px;
    }
    &.el-button--text {
      padding: 9px 0;
      border: none;
      background-color: transparent;
    }
    &.el-button--danger {
      border-color: #f56c6c;
      background-color: #f56c6c;
      color: #fff;
    }
  }

  // 表单
  .el-form {
    .el-form-item--small.el-form-item {
      margin-bottom: 12px;
      .el-form-item__error {
        position: initial;
      }
      .el-form-item__content {
        .form-detail {
          display: inline-block;
          min-width: 200px;
          background-color: #f7f9fd;
          padding: 6px 12px;
          color: #8895b7;
          line-height: 20px;
          border-radius: 4px;
          -webkit-border-radius: 4px;
          -moz-border-radius: 4px;
          -ms-border-radius: 4px;
          -o-border-radius: 4px;
        }
      }
    }
    &.el-form--inline .el-form-item:last-child {
      margin-right: 0;
    }
  }

  // 卡片
  .el-card {
    border: none !important;
    box-shadow: 0px 5px 10px 0px rgba(194, 202, 222, 0.5) !important;
  }

  // 表格
  .el-table.el-table--small {
    font-size: 14px;
    border-top: 1px solid #e4e8f2;
    .el-table__header {
      background: #f7f9fd;
      th {
        font-weight: normal;
      }
    }
    .el-table__header,
    .el-table__row {
      height: 48px;
    }
    .el-table__cell {
      padding: 6px 0;
    }
  }

  .el-input__inner {
    padding: 0 12px;
  }
  .el-date-editor .el-input__inner {
    padding-left: 30px;
  }
}

// 弹窗样式
.el-dialog {
  .el-dialog__header {
    padding: 12px 16px;
    background: #fdfdff;
    color: #494c53;
    font-weight: bold;
    font-size: 16px;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    .el-dialog__title {
      font-size: 16px;
      color: #494c53;
      font-weight: normal;
    }
    .el-dialog__headerbtn {
      top: 16px;
      right: 16px;
      i {
        font-size: 20px;
      }
    }
  }
  .el-dialog__footer {
    padding: 12px 16px;
    background: #fdfdff;
    border-radius: 4px;
  }

  .el-dialog__body {
    padding: 0;
    .content {
      padding: 16px 16px 4px 16px;
    }
    .el-table.el-table--small {
      .el-table__header {
        background: #f7f9fd;
      }
      .el-table__header,
      .el-table__row {
        height: 40px;
      }
      .el-table__cell {
        padding: 4px 0;
      }
    }
    .el-input.is-disabled .el-input__inner {
      background-color: #f7f9fd;
      color: #8895b7;
      border-color: #fdfdff;
    }
    .form__footer {
      height: 48px;
      padding: 8px 16px;
      background-color: #fdfdff;
      border-radius: 4px;
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
      -ms-border-radius: 4px;
      -o-border-radius: 4px;
    }
  }
}

.my-dialog .el-dialog .el-dialog__body {
  padding-bottom: 18px;
}

// 下拉框
.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
  background-color: #f7f9fd !important;
}

* {
  &::-webkit-scrollbar-track-piece {
    background: rgba(228, 232, 242, 0.1);
  }

  &::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  &::-webkit-scrollbar-thumb {
    background: #e4e8f2;
  }
}

// 含表单、表格页面公用样式
.list-page {
  height: 100%;
  .card-box-header {
    font-size: 14px;
    font-weight: bold;
    color: #494c53;
    .header-btn {
      font-weight: normal;
    }
  }
  .el-card__body {
    padding: 20px 16px;
    .list-h {
      margin-bottom: 4px;
      .el-button {
        margin-bottom: 12px;
      }
      .el-form-item__content .el-button {
        margin-bottom: 0;
      }
    }
    // 分页栏
    .pagination-container {
      padding-bottom: 0;
    }
  }
  .card-box {
    .el-card__header,
    .el-card__body {
      padding: 16px;
    }
  }
  .el-input__inner {
    border-color: #e4e8f2;
    &:focus {
      border-color: #5298ff;
    }
  }

  // 表格样式
  .el-table--striped .el-table__body tr.el-table__row--striped {
    td.el-table__cell {
      background-color: #fdfdff;
    }
    &.hover-row {
      td.el-table__cell {
        background-color: #f7f9fd;
      }
    }
  }

  .el-button--text.btns-danger {
    color: #e45d5d;
    &:hover {
      color: #e45d5d;
    }
  }
  template {
    display: block;
  }
}
.minh100 {
  min-height: 100%;
}
// 详情页公用样式
.content-detail {
  height: 100%;
  .el-page-header__content {
    font-size: 14px;
    color: #494c53;
  }
  .card-box {
    margin-bottom: 8px;
    &:last-child {
      margin-bottom: 0;
    }
    &-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .header-btn {
        display: flex;
        align-items: center;
        font-size: 14px;
        color: #494c53;
        cursor: pointer;
      }
    }
    &--headerwrap {
      padding: 8px 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .el-page-header {
        height: 32px;
        align-items: center;
      }
    }
    &--downloadbtn {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      width: 140px;
    }
    .el-card__body {
      padding: 0;
      .el-page-header__left {
        color: #5298ff;
        &::after {
          height: 14px;
        }
      }
      .el-page-header__icon {
        font-size: 14px;
        margin-right: 8px;
      }
      .content-box {
        margin-top: 16px;
        margin-bottom: 16px;
        padding-left: 16px;
        padding-right: 16px;
        color: #495164;
        // .el-form-item {
        //   margin-bottom: 12px;
        //   .el-form-item__label {
        //     color: #495164;
        //   }
        //   .el-form-item__error {
        //     position: initial;
        //   }
        // }
        .tip {
          color: #8895b7;
        }
        // input::placeholder {
        //   color: #8895B7;
        // }
        .el-input.is-disabled .el-input__inner {
          background-color: #f7f9fd;
          color: #8895b7;
          border-color: #f7f9fd;
        }
        .el-textarea.is-disabled .el-textarea__inner {
          background-color: #fdfdff;
          color: #8895b7;
          border-color: #fdfdff;
        }
        .el-select .el-input.is-disabled .el-select__caret {
          color: #8895b7;
        }
      }
    }
    .el-card__header {
      padding: 14px 16px;
      .card-box-header > span {
        font-size: 14px;
        font-weight: bold;
        color: #494c53;
      }
      // .header-btn {
      //   color: #494C53;
      // }
    }
    .el-button {
      background-color: #fdfdff;
      border-color: #5298ff;
      color: #5298ff;
      font-size: 14px;
      padding: 6px 17px;
      &.el-button--primary {
        background-color: #5298ff;
        color: #fff;
        &:hover {
          background-color: #3e8cff;
        }
        &.is-disabled {
          color: #ffffff;
          background-color: #a9ccff;
          border-color: #a9ccff;
        }
      }
      &.el-button--danger {
        border-color: #f56c6c;
        background-color: #f56c6c;
        color: #fff;
      }
    }
  }
  .form-box {
    .tip {
      margin-left: 10px;
      color: #999;
    }
  }
  .flex-info-wrap {
    display: flex;
    align-items: flex-start;
    padding-bottom: 12px;
    line-height: 1.5;
    font-size: 14px;
    .l-content {
      padding-left: 6px;
      padding-right: 10px;
    }
    .right-align {
      flex-shrink: 0;
    }
  }
  .right-align {
    display: inline-block;
    width: 100px;
    text-align: right;
  }
  .right-align-box {
    text-align: right;
  }
  .sub-title {
    line-height: 40px;
    background-color: rgb(238, 241, 246);
    padding-left: 20px;
    margin-bottom: 20px;
  }
  .mt20 {
    margin-top: 20px;
  }
}

// 编辑器样式
.tinymce-box {
  min-height: 361px;
  border-radius: 4px;
  &.read-content {
    border: 1px solid #e4e8f2;
    min-height: 30px;
    height: auto;
    line-height: 2;
    padding: 6px;
    table td {
      padding: 0.4rem;
    }
  }
  .tox .tox-tbtn svg {
    fill: #495164;
  }
  .tox-tinymce {
    border-radius: 4px;
    border-color: #e4e8f2;
  }
  .tox .tox-toolbar,
  .tox .tox-toolbar__overflow,
  .tox .tox-toolbar__primary {
    background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23e4e8f2'/%3E%3C/svg%3E")
      left 0 top 0 #fff;
  }

  .tox .tox-statusbar {
    border-top: none;
    height: auto;
  }
}
.icon-checkbox {
  width: 20px !important;
  height: 20px !important;
  background: url("/unselect.png") no-repeat !important;
  background-size: 20px 20px !important;
}

.checkbox-checked {
  width: 20px !important;
  height: 20px !important;
  background: url("/select.png") no-repeat !important;
  background-size: 20px 20px !important;
}

.back-picture {
  .el-upload-list__item {
    width: 56px;
    height: 56px;

    .el-upload-list__item-actions {
      font-size: 18px;
    }
  }

  .el-upload--picture-card {
    width: 56px;
    height: 56px;
    background: #fdfdff;
    border-radius: 4px;
    border: 1px solid #e4e8f2;

    i {
      height: 100%;
      width: 100%;
      line-height: 100%;
      font-size: 18px;
      color: #8c939d;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;

      span {
        font-size: 12px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #8895b7;
      }
    }
  }

  &.custumWH {
    .el-upload-list__item,
    .el-upload--picture-card {
      width: 170px;
      height: 140px;
    }
    // .el-upload-list--picture-card .el-upload-list__item {
    //   border: none;
    // }
  }
}

.el-upload-list__item.is-success .el-upload-list__item-status-label {
  display: none !important;
}

.custom-select {
  width: 172px !important;

  &.el-select .el-input .el-select__caret {
    color: #5298ff;
  }
  .el-input__inner {
    border-color: rgba(82, 152, 255, 0.05);
    background-color: rgba(82, 152, 255, 0.05);
    color: #5298ff;
    text-align: center;
  }

  &.el-select:hover .el-input__inner {
    border-color: #5298ff;
  }
}

.el-popover {
  max-width: 200px;
}

.icon-plus {
  vertical-align: -2px;
  margin-right: 4px;
}

.search-btn {
  display: flex;
  justify-content: flex-end;
  height: 40%;
}
